package example.fileTest.example1;

import java.io.File;

public class SetFileReadOnly {

	public static void main(String[] args) {
		File file = new File("C:/java.txt");
		System.out.println("Before Read Only = " + file.canWrite());
		System.out.println("file.setReadOnly() = " + file.setReadOnly());
		System.out.println("After Read Only = " + file.canWrite());
	}

}
